include_directories(${PROJECT_SOURCE_DIR}/base/include)
include_directories(${PROJECT_SOURCE_DIR}/common/include)
include_directories(${PROJECT_SOURCE_DIR}/foundation/media/include)
include_directories(${PROJECT_SOURCE_DIR}/foundation/stream_server/include)
include_directories(${PROJECT_SOURCE_DIR}/foundation/web_server/include)
include_directories(${PROJECT_SOURCE_DIR}/foundation/record/include)
include_directories(${PROJECT_SOURCE_DIR}/third_party/include)
include_directories(${PROJECT_SOURCE_DIR}/hal/init/include)

find_path(GSTREAMER_INCLUDE_DIR gst/gst.h HINTS ${CMAKE_SYSROOT}/usr/include/gstreamer-1.0)
find_path(GLIB_INCLUDE_DIR glib.h HINTS ${CMAKE_SYSROOT}/usr/include/glib-2.0)
find_path(GLIBCONFIG_INCLUDE_DIR glibconfig.h HINTS ${CMAKE_SYSROOT}/usr/lib/glib-2.0/include)
find_path(GSTWEBRTC_INCLUDE_DIR gst/webrtc/webrtc.h HINTS ${CMAKE_SYSROOT}/usr/include/gstreamer-1.0)
find_path(GSTAPP_INCLUDE_DIR gst/app/gstappsrc.h HINTS ${CMAKE_SYSROOT}/usr/include/gstreamer-1.0)
find_path(GSTRTSP_INCLUDE_DIR gst/rtsp-server/rtsp-server.h HINTS ${CMAKE_SYSROOT}/usr/include/gstreamer-1.0)

include_directories(${GSTREAMER_INCLUDE_DIR})
include_directories(${GLIB_INCLUDE_DIR})
include_directories(${GLIBCONFIG_INCLUDE_DIR})
include_directories(${GSTWEBRTC_INCLUDE_DIR})
include_directories(${GSTAPP_INCLUDE_DIR})
include_directories(${GSTRTSP_INCLUDE_DIR})

# 添加源码目录
include_directories(${PROJECT_SOURCE_DIR}/foundation/record/src)

link_libraries(${EL_ALL_TEST_LIBS})

# 添加测试
enable_testing()

# 添加测试可执行文件
add_executable(media_snap_test
    media_snap_test.cpp
)

add_executable(media_audio_test
    media_audio_test.cpp
)

# 添加测试
add_test(NAME MediaSnapTest COMMAND media_snap_test)
add_test(NAME MediaAudioTest COMMAND media_audio_test)
